service.service("serverService",['requestService',function(requestService){
    var service={};

    var getApiPath=function(url){
        return apiUtil.getPath('/server',url);
    };

    /**
     * 返回服务
     * @param successCallback
     * @param errorCallback
     */
    service.getServers=function(successCallback,errorCallback){
        requestService.getApi(getApiPath(),{},successCallback,errorCallback);
    };

    /**
     * info
     * @param id
     * @param successCallback
     * @param errorCallback
     */
    service.getInfo=function(id,successCallback,errorCallback){
        requestService.getApi(getApiPath(id+'/info'),{},successCallback,errorCallback);
    };

    /**
     * infos
     * @param successCallback
     * @param errorCallback
     */
    service.getInfos=function(successCallback,errorCallback){
        requestService.getApi(getApiPath('/infos'),{},successCallback,errorCallback);
    };

    return service;
}]);